//
//  BTNCell.m
//  Review-Objective-C
//
//  Created by mac on 2017/7/21.
//  Copyright © 2017年 com.qiankun. All rights reserved.
//

#import "BTNCell.h"

@implementation BTNCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self =  [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initUI];
    }
    return self;
}

-(void)initUI{
    UIButton *btn = [UIButton new];
    btn.backgroundColor =  [UIColor blackColor];
    btn.frame = CGRectMake(100, 0, 20, 30);
    
    [self addSubview:btn];
    
    [btn addTarget:self action:@selector(BtnClick:) forControlEvents:UIControlEventTouchUpInside];
    
}

-(void)BtnClick:(UIButton *)btn{
    NSLog(@"sjdakdsa");
    [_BTNCellDelegate selectBtn:btn];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

@end
